package ymr.gui;

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JPanel;

public class Button extends JPanel{

	private static final long serialVersionUID = -3542733722570432849L;
	private int coordx = 0;
	private int coordy = 0;
	private int diameter = 10;
	private Color color;
	
	public Button(int dm, Color color){
		super();
		setSize(100,100);
		setPreferredSize(getSize());
		this.diameter = dm;
		this.color = color;
	}

	@Override
	public void paintComponent(Graphics g){
		super.paintComponent(g);
		g.setColor(color);
		g.fillOval(coordx, coordy, diameter, diameter);
	}

}
